import { Map } from 'immutable';

import * as actionTypes from './constants';
import { actionType } from './s_mark'

const defaultState: Map<string, object> = Map({
  role_menu: {}
})

export default function reducer(state = defaultState, action: actionType) {
  const { payload, type } = action
  switch (type) {
    case actionTypes.ROLE_MENU:
      return state.set("role_menu", payload);
    default:
      return state;
  }
}